package com.yanyeori.framework.storage.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration;

/**
 * OSS 配置信息
 *
 * @author chenkuan 2023/02/14
 */
@Getter
@Setter
@Configuration
@ConfigurationProperties(prefix = "oss")
public class OSSProperties {
    //域名http前缀
    private String http = "https://";
    //地域节点名称
    private String endpoint;
    //bucket桶名称
    private String bucketName;
    //RAM账号accessKeyId
    private String accessKeyId;
    //RAM账号accessKeySecret
    private String accessKeySecret;
    //url过期时间，默认12小时(分钟)
    private long urlExpiration = 720;

    @NestedConfigurationProperty
    private STSProperties sts;
}
